package com.cans.service.pms.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.cans.dao.pms.ISysUserDao;
import com.cans.model.pms.SysUser;
import com.cans.service.pms.api.ISysRoleService;
import com.cans.service.pms.api.ISysUserService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

/**
 * @author shencan
 * @date 2019/10/14 13:36
 * @description
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class SysUserServiceImpl extends ServiceImpl<ISysUserDao, SysUser> implements ISysUserService {

    @Resource
    private ISysRoleService sysRoleService;

    @Override
    public SysUser getUserFull(String username) {

        QueryWrapper<SysUser> qw = new QueryWrapper<>();
        qw.eq("username",username);

        SysUser user = this.getOne(qw);

        return user;
    }
}
